<script setup lang="ts">
import GoodsTypeEnum from '@/utils/GoodsType'
import {onMounted, reactive, ref} from 'vue'
const value = ref(10);
const list = reactive([{
  title: '实物商品1',
  help: '物流发货',
  value: ''
}]);

const handleItem = (value) => {

}

</script>

<template>

    <div class="goods-type">


      <div
          class="type-item arco-card-body"
          v-for="(item, index) in list"
          :key="index"
          :class="{ checked: true }"
          v-show="true"
          @click="handleItem(item.value)"
      >
        <div class="type-title">{{ item.title }}</div>
        <div class="type-help">{{ item.help }}</div>
        <icon-check />
      </div>
    </div>

</template>

<style scoped>
.goods-type {
  display: flex;
  margin-bottom: 15px;

  .type-item {
    position: relative;
    border-radius: 2px;
    padding: 8px 26px;
    margin-right: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #ffffff;
    color: #262626;
    border: 1px solid #d9d9d9;
    cursor: pointer;
    user-select: none;
    transition: all .2s ease .1s;

    &.checked {
      border-color: @primary-color;

      .type-title {
        color: @primary-color;
        transition: all .2s ease .1s;
      }

      &:after {
        position: absolute;
        right: 0;
        bottom: 0;
        content: '';
        width: 0;
        height: 0;
        border: 20px solid transparent;
        border-bottom-color: @primary-color;
        transform: translate(20px, 20px) rotate(135deg);
      }
    }

    .type-title {
      color: #262626;
      font-size: 14px;
    }

    .type-help {
      color: #8a9099;
      font-size: 12px;
    }

    .icon-checked {
      position: absolute;
      right: 2px;
      bottom: 2px;
      z-index: 1;
      font-size: 12px;
      color: #fff;
    }
  }
}
</style>